//
//  main.cpp
//  L13Ref
//
//  Created by ai-nixs on 2017/10/29.
//  Copyright © 2017年 nixinsheng. All rights reserved.
//

#include <iostream>
using namespace std;

class Point {
private:
    int x,y;
    
public:
    Point(int x,int y){
        this->x = x;
        this->y = y;
    }
    
    int getX(){
        return x;
    }
    int getY(){
        return y;
    }
    
    void add(Point &p){
        this->x+=p.x;
        this->y+=p.y;
        cout<<"Point("<<x<<","<<y<<")"<<endl;
    }
};


int main(int argc, const char * argv[]) {
    Point p(1,1);
    Point p1(2,3);
    p.add(p1);
    return 0;
}
